/*
 *  rootlocuswidget.h
 *  Perceel
 *
 *  Created by Nicola Gigante on 30/03/08.
 *  Copyright 2008 Nicola Gigante. All rights reserved.
 *
 */

#ifndef __ROOTLOCUSWIDGET_H__
#define __ROOTLOCUSWIDGET_H__

#include <QMessageBox>

#include "plotwidget.h"

class RootLocusWidget : public PlotWidget
{
	Q_OBJECT
	
	bool m_convergence;
	
public:
	RootLocusWidget(QWidget *parent = 0);
	
	virtual void setTF(const TF &tf) { PlotWidget::setTF(tf); m_convergence = true; }
	
protected:
	virtual void initPlot(QPainter &);
	virtual void plot(QPainter &);
	virtual void guessScale();
	virtual QMap<QString, QString> pixelDetails(QPoint p);
	
private:
	void drawMarks(QPainter &painter);
	void fillLocusAxis(QPainter &painter);
	
	void convergenceError(QPainter &painter);
	bool checkPhase(Complex s);
};

#endif
